package com.tvunetworks.center.user.model.result;

import com.tvunetworks.center.common.util.Result;
import com.tvunetworks.center.common.util.ResultUtil;

/**
 * @program: gcs
 * @description: ResultConstant
 * @author lebronchen
 * @create: 2019-11-08 17:58
 **/
public interface ResultConstant {
    /**
     * BookingAPI
     */
    interface BookingAPI {
        Result GET_SESSION_FAILED = ResultUtil.error("80050005", "Get session failed");
        Result INVALID_SESSION = ResultUtil.error("80050007", "Invalid session");
    }

    /**
     * BookMarkShare
     */
    interface BookMarkShare {
        Result BOOKMARK_ALREADY_SHARE = ResultUtil.error("80060001", "Some user already share");

    }

    /**
     * GridEvent
     */
    interface GridEvent {
        Result USER_NOT_EXIST = ResultUtil.error("81002001", "User not exist");
        Result GRID_NOT_EXIST = ResultUtil.error("81002002", "Grid not exist");
        Result RECEIVER_NOT_EXIST = ResultUtil.error("81002003", "Receiver not exist");
        Result RECEIVER_NOT_BELONG_USER = ResultUtil.error("81002004", "Receiver not belong to user");
        Result USER_CAN_NOT_ADD_EVENT = ResultUtil.error("81002005", "The account of this email does not have permission to call this API, please check the email you input");

        Result PRE_PAIR_TIME_MUST_BIGGER_THAN_NOW = ResultUtil.error("81002006", "PrePairTime must be bigger than now");
        Result PREPARE_TIME_CAN_NOT_BIGGER_THAN_ENT_TIME = ResultUtil.error("81002007", "PrePairTime can not bigger than EndTime");
        Result PREPARE_TIME_CAN_NOT_BIGGER_THAN_START_TIME = ResultUtil.error("81002008", "PrePairTime can not bigger than StartTime");
        Result END_TIME_MUST_BIGGER_THAN_NOW = ResultUtil.error("81002009", "EndTime must be bigger than now");
        Result END_TIME_MUST_BIGGER_THAN_START_TIME = ResultUtil.error("81002010", "EndTime must be bigger than StartTime");

        Result EVENT_TASKID_EXIST = ResultUtil.error("81002011", "Event taskId already exist");
        Result EVENT_NOT_EXIST = ResultUtil.error("81002012", "Event not exist");
        Result ALREADY_PAIRED_CAN_NOT_UPDATE_PREPAIR_TIME = ResultUtil.error("81002003", "Already paired can not update PrePairTime");
        Result EVENT_ENDED_CAN_NOT_UPDATE = ResultUtil.error("81002014", "Event ended, can not update");
        Result EVENT_CANCELED_CAN_NOT_UPDATE = ResultUtil.error("81002015", "Event canceled, can not update");
        Result EVENT_STARTED_CAN_NOT_UPDATE_START_TIME = ResultUtil.error("81002016", "Event started, can not update StartTime");
        Result EVENT_STARTED_CAN_NOT_UPDATE_PREPAIR_TIME = ResultUtil.error("81002017", "Event started, can not update PrePairTime");
        Result EVENT_ENDED_CAN_NOT_CANCEL = ResultUtil.error("81002018", "Event ended, can not cancel");
        Result EVENT_CANCELED_CAN_NOT_CANCEL = ResultUtil.error("81002019", "Event canceled, can not cancel");


    }

    /**
     * ExtAPI
     */
    interface ExtAPI {
        Result USER_NOT_EXIST = ResultUtil.error("81002301", "User not exist");
        Result DEVICE_NAME_EXIST = ResultUtil.error("81002302", "Device name exist");
        Result CREATE_DEVICE_FAILED = ResultUtil.error("81002303", "Create device failed");
    }

    /**
     * TPC
     */
    interface TPC {
        Result REQUEST_PID_FAILED = ResultUtil.error("81002701", "Call TPC request pid failed");
        Result REQUEST_NULL_PID = ResultUtil.error("81002702", "Call TPC request pid, return null pid");
        Result REQUEST_FAILED = ResultUtil.error("81002703", "Call TPC request failed");
        Result REQUEST_EXCEPTION = ResultUtil.error("81002704", "Call TPC request exception");
    }

    /**
     * Instance
     */
    interface Instance {
        Result CALL_INSTANCE_FAILED = ResultUtil.error("81002801", "Call instance-service failed");
        Result LIST_ACTIVE_REGION_FAILED = ResultUtil.error("81002802", "List active region failed");
        Result CREATE_INSTANCE_FAILED = ResultUtil.error("81002803", "Create instance failed");
        Result SHUTDOWN_INSTANCE_FAILED = ResultUtil.error("81002804", "Shutdown instance failed");
        Result CREATED_INSTANCE_IS_NULL = ResultUtil.error("81002805", "Created instance return null");
        Result LIST_INSTANCE_FAILED = ResultUtil.error("81002806", "List instancefailed");
    }

    /**
     * UserInstance
     */
    interface UserInstance {
        Result NOT_EXIST = ResultUtil.error("81002901", "UserInstance not exist");
        Result ALREADY_CLOSED = ResultUtil.error("81002902", "UserInstance already closed");
        Result INVALID_PEER_ID = ResultUtil.error("81002903", "Invalid peerId");
        Result SCHEDULE_TIME_CAN_NOT_BE_NULL = ResultUtil.error("81002903", "Schedule shutdown time can not be null");
        Result SCHEDULE_TIME_CAN_NOT_LESS_THAN_NOW = ResultUtil.error("81002904", "Schedule shutdown time can not less than now");
    }

    /**
     * User
     */
    interface User {
        Result USER_NOT_EXIST = ResultUtil.error("81003401", "User not exist");
        Result USER_IS_NOT_USER_OR_ADMIN = ResultUtil.error("81003402", "User is not admin role or user role");
        Result OPERATION_USER_NOT_EXIST = ResultUtil.error("81003403", "operation user not exist");
    }

    /**
     * UserDevice
     */
    interface UserDevice {
        Result USER_NOT_OWN_DEVICE = ResultUtil.error("81002501", "User not own device!");
        Result SERVER_NAME_IS_EMPTY = ResultUtil.error("81002502", "Server name can not empty!");
        Result USER_HAVA_DEVICE = ResultUtil.error("81002503", "The user already owns the device!");
    }

    /**
     * CustomizedUserGroup
     */
    interface CustomizedUserGroup {
        Result USER_EXIST_GROUP = ResultUtil.error("81002601", "User exist group");
        Result GROUP_EXIST = ResultUtil.error("81002602", "Group exist");
        Result GROUP_NOT_EXIST = ResultUtil.error("81002603", "Group not exist");
        Result GROUP_NOT_BELONG_USER = ResultUtil.error("81002604", "Group not belong user");
        Result GROUP_EXIST_DEVICE_CAN_NOT_DELETE = ResultUtil.error("81002605", "Group exist device, can not delete");
        Result GROUP_IS_DEFAULT_CAN_NOT_DELETE = ResultUtil.error("81002606", "Default group can not delete");
    }

    /**
     * UserService
     */
    interface UserService {
        Result GET_SESSION_FAILED = ResultUtil.error("81003001", "Get session failed");
    }

    /**
     * UpdateUserEmail
     */
    interface UpdateUserEmail {
        Result USER_NOT_EXIST_IN_CC = ResultUtil.error("81003101", "User not exist in CC");
        Result EMAIL_EXIST_IN_CC = ResultUtil.error("81003102", "Email exist in CC");
        Result USER_NOT_EXIST_IN_USERSERVICE = ResultUtil.error("81003103", "User not exist in CC");
        Result EMAIL_EXIST_IN_USERSERVICE = ResultUtil.error("81003104", "Email exist in CC");

        Result EMAIL_EXIST_IN_DASHBOARD = ResultUtil.error("81003105", "Email exist in dashboard");

        Result USERSERVICE_UPDATE_EMAIL_FAILED = ResultUtil.error("81003106", "UserService update email failed");
        Result DASHBOARD_UPDATE_EMAIL_FAILED = ResultUtil.error("81003107", "Dashboard update email failed");
    }

    /**
     * ExportUser
     */
    interface ExportUser {
        Result USER_NOT_EXIST_IN_CC = ResultUtil.error("81003201", "No user to export");
    }

    /**
     * RoleManagement
     */
    interface RoleManagement {
        Result ADMIN_PERMISSION = ResultUtil.error("81003301", "Just administrator account can create roles!");
        Result ROLE_NOT_EXIST = ResultUtil.error("81003302", "This role is not exist!");
        Result ROLE_NAME_IS_EXIST = ResultUtil.error("81003303", "This role name is exist!");
        Result USER_NOT_EXIST = ResultUtil.error("81003305", "This user is not exist!");
    }

    /**
     * RoleUser
     */
    interface RoleUser {
        Result USER_NOT_EXIST_OR_NOT_BELONG_ACCOUNT = ResultUtil.error("81003401", "User can not exist or is not user permission or dose not belong of account!");
        Result ROLE_NOT_EXIST_OR_NOT_BELONG_ACCOUNT = ResultUtil.error("81003302", "Role not exist or role dose not belong of account!");
        Result USER_PARENT_ACCOUNT_NOT_EXIST = ResultUtil.error("81003303", "User parent account not exist!");
        Result ROLE_USER_RELATION_ALREADY_HAVE_EXIST = ResultUtil.error("81003303", "The relationship already exists!");
    }

    /**
     * DeleteUser
     */
    interface DeleteUser {
        Result TARGET_USER_NOT_EXIST = ResultUtil.error("", "Target user not exist");
        Result SUPER_ADMIN_CAN_NOT_DELETE_SUPER_ADMIN = ResultUtil.error("", "Super admin can not delete super admin");
        Result SUPPORT_CAN_NOT_DELETE_SUPER_ADMIN_AND_SUPPORT = ResultUtil.error("", "Support can not delete super admin and support");
        Result ADMIN_CAN_NOT_DELETE_SUPER_ADMIN_AND_SUPPORT_AND_ADMIN = ResultUtil.error("", "Customer admin can not delete super admin and support and customer admin");
        Result ADMIN_CAN_NOT_DELETE_NOT_BELONE_USER = ResultUtil.error("", "Customer admin can not delete customer user that not belong to he");
        Result USER_CAN_NOT_DELETE_OTHERS = ResultUtil.error("", "Customer user can not delete others");
    }

    /**
     * UserBehavior
     */
    interface UserBehavior {
        Result PARSING_BEHAVIOR = ResultUtil.error("81004000", "Description Failed to parse user behavior records");
    }
}
